<!DOCTYPE html>
<html>
	<head>
		<title>我的收藏</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<link rel="stylesheet" href="/js/plugins/bootstrap-4.1.1-dist/css/bootstrap.min.css">
		<script src="/js/plugins/jquery/jquery.min.js"></script>
		<script src="/js/plugins/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
		<script src="/js/plugins/jrender/jrender.min.js"></script>
		<link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
		<link rel="stylesheet" href="/css/reset.css" />
		<link rel="stylesheet" href="/css/userTravels.css" />
		<link rel="stylesheet" href="/js/plugins/dialog2/dialog.css" />
		<script src="/js/plugins/dialog2/dialog.min.js"></script>
		<link rel="stylesheet" href="/css/userProfiles.css">
		<script>
            $(function () {
                var user = JSON.parse(sessionStorage.getItem("user"));

                $.get("/favorites/" + user.id+"/strategy",function (data) {
					$(".fade").renderValues(data);
                });

                $.get("/favorites/" + user.id+"/travels",function (data) {
					$(".show").renderValues(data);
                    $(".comment-content img").css('width','100%');
                });
                $.get("/favorites/" + user.id+"/daily",function (data) {
                    console.log(data);
                    $(".fade2").renderValues(data);
                });

                $.get("/favorites/" + user.id+"/strategyCounts", function (data) {
                    $("#favoritesCounts").html(data);
                })
                $.get("/favorites/" + user.id+"/dailyCounts", function (data) {
                    $("#dailyCounts").html(data);
                })

                	$.get("/favorites/" +user.id+"/travelCounts", function (data) {
                    console.log(data);
                    $("#hangs").html(data);
                })
            });

		</script>
	</head>

	<body>
	<div class="search-head">
		<div class="row nav-search">
			<div class="col">
				<a href="profiles.html">
					<span><i class="fa fa-chevron-left"></i></span>
				</a>
			</div>
			<div class="col">
				<span>我的收藏</span>
			</div>
			<div class="col"></div>
		</div>
	</div>

	<div class="tabs">
		<ul class="nav nav-pills nav-justified  border border-left-0 border-top-0 border-right-0" id="pills-tab" role="tablist">

			<li class="nav-item">
				<a class="nav-link active" id="travels-tab" data-toggle="pill" href="#travels">
					游记[<span id="hangs">5</span>]
				</a>
			</li>
			<li class="nav-item">
				<a class="nav-link " id="comments-tab" data-toggle="pill" href="#comments">
					攻略[<span id="favoritesCounts"></span>]
				</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact">
					日报[<span id="dailyCounts">0</span>]
				</a>
			</li>
		</ul>
		<div class="container tab-content" id="pills-tabContent">
			<div class="tab-pane  show active" id="travels">
				<input type="hidden" name="currentPage"  value="1"/>
				<input type="hidden" name="pageSize" value="5">
				<input type="hidden" name="rows" value="1">
				<div render-loop="list">
					<div><div class="row">
						<div class="col-2 comment-head">
							<img  class="rounded-circle" render-src="list.user.headImgUrl"/>
						</div>
						<div class="col">
							<span class="comment-date" render-html="list.favoritesTime"></span>
							<div class="comment-content">
								<p render-html="list.travelcontent.content"></p>
							</div>
							<ul class="comment-img"><li>
								<img  render-src="list.travel.coverUrl">
							</li></ul>
						</div>
					</div>
					</div></div>
			</div>
			<div class="comment tab-pane fade" id="comments">
				<input type="hidden" name="currentPage" value="1"/>
				<input type="hidden" name="pageSize" value="5">
				<input type="hidden" name="rows" value="1">
				<div render-loop="list">
				<div>
					<div class="row">
					<div class="col-2 comment-head">
						<img  class="rounded-circle" render-src="list.user.headImgUrl"/>
					</div>
					<div class="col">
						<span class="comment-date" render-html="list.favoritesTime"></span>
						<div class="comment-content">
								<p render-html="list.strategyContent.content"></p>
						</div>
						<ul class="comment-img"><li>
							<img  render-src="list.strategy.coverUrl">
						</li></ul>
						</div>
					</div>
				</div>
				</div>

				</div>
			<div class="comment tab-pane fade2" id="pills-contact">
				<input type="hidden" name="currentPage"  value="1"/>
				<input type="hidden" name="pageSize" value="5">
				<input type="hidden" name="rows" value="1">
				<div render-loop="list">
					<div>
						<div class="row">
							<div class="col-2 comment-head">
								<img  class="rounded-circle" render-src="list.user.headImgUrl"/>
							</div>
							<div class="col">
								<span class="comment-date" render-html="list.favoritesTime"></span>
								<div class="comment-content">
									<p render-html="list.dailyContent.dailyContent"></p>
								</div>
								<ul class="comment-img"><li>
									<img  render-src="list.daily.coverUrl">
								</li></ul>
							</div>
						</div>
					</div>
				</div>
			</div>
			</div>
		</div>
	</div>
	</body>
</html>